package demo3;

public class Duck extends Animal implements ISwimming,IFlying,IRunning{
    public Duck(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println(this.name+" can fly");
    }

    @Override
    public void run() {
        System.out.println(this.name+" can run");
    }

    @Override
    public void swim() {
        System.out.println(this.name+" can swim");
    }
}
